function isDev() {
  return process.env.FIG_ENV === 'dev'
}

class LogUtils {
  /**
   * log打印输出，常规模式
   * @message 打印输出信息
   */
  static d(message?: any, ...optionalParams: any[]) {
    if (isDev()) {
      // eslint-disable-next-line
      console.log(message, ...optionalParams);
    }
  }

  /**
   * 日志警告模式输出
   */
  static w(message?: any, ...optionalParams: any[]) {
    if (isDev()) {
      console.warn(message, ...optionalParams)
    }
  }

  /**
   * 日志error模式输出
   */
  static e(message?: any, ...optionalParams: any[]) {
    if (isDev()) {
      console.error(message, ...optionalParams)
    }
  }
}
export default LogUtils
